import random
import time


def bubble_sort(li):
    for i in range(len(li) - 1):
        for j in range(len(li) - i - 1):
            if li[j + 1] < li[j]:
                li[j + 1], li[j] = li[j], li[j + 1]


def test():
    li = [random.randint(0, 10000) for _ in range(10000)]
    start_time = time.time()
    bubble_sort(li)
    end_time = time.time()
    print(li, '\n', end_time - start_time)


if __name__ == '__main__':
    test()
